package com.myapp.web.action.mgr;

import com.myapp.service.sys.SysBo;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;

public class AdminAction extends ActionSupport {
	
	private static final long serialVersionUID = 2645854350051061392L;

	private static final Logger LOG = LoggerFactory.getLogger(AdminAction.class);
	
	private String verifyCode;
	private String passwd;
	private String userid;
	
	public String getPasswd() {
		return passwd;
	}

	public void setPasswd(String passwd) {
		this.passwd = passwd;
	}

	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public void setVerifyCode(String verifyCode) {
		this.verifyCode = verifyCode;
	}
	
	private SysBo sysBo;
		
	public String execute() throws Exception {
		LOG.info("execute ...............\n");
		if(sysBo.login(userid, passwd)){
			//this.request.getSession().setAttribute(AuthFilter.LOGIN_SESSION_KEY, true);
			return SUCCESS;
		}else
		{
			return SUCCESS ;
		}
    }
		
	public void setSysBo(SysBo sysBo) {
		this.sysBo = sysBo;
	}
}
